New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@frontender-magazine/service-api

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frontender-magazine/service-api

Common microservice api methods

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

TM Micro Service API Prototype class

This class provide fetch wrapper, token and Service URL setter mainly. Just to avoid code duplication.

Requirements

Possibly you will need babel-polyfill to use it.

Documentation

Table of Contents

ErrorBadRequest

Custom error message for Bad Request server response

Parameters

  • message (string | null) error details (optional, default null)

ErrorCache

Custom error message for cache fail

Parameters

  • message (string | null) error details (optional, default null)

ErrorNotFound

Custom error message for Not Found server response

Parameters

  • message (string | null) error details (optional, default null)

ErrorServerResponse

Custom error message for abstract server response

Parameters

  • statusCode number http status code
  • statusText string http status code text
  • message (string | null) error details (optional, default null)

MicroServiceAPI

TM Micro Service Proto API

Parameters

  • url string service url
  • token (string | null) user access tocken if available (optional, default null)

url

Service URL

Properties

token

User access token

Properties
  • token (string | null)? user access tocken if available

messages

Object with class service messages

Type: Object

setToken

Set access token

Parameters

setVersion

Set service version

Parameters
  • version string service version

checkVersion

Validate service version

Parameters
  • version string service version

  • Throws Error if URL do not match format Error will be thrown

Returns string version - service version

request

Fetch remote resource

Parameters
  • url string resource url
  • userOptions Object user defined options

Returns Promise Promise with server Response

tmpVersion

Service version

Properties

  • version string? service version

Keywords

FAQs

Package last updated on 08 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc